<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Json美化</title>
    <link rel="icon" href="{{ url_for('static', filename='ico/favicon_curl.png') }}">

    <link rel="stylesheet" href="{{ url_for('static', filename='css/curl_input.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/beautify_json_page.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/alert_msg.css') }}">

    <script type="module" src="{{ url_for('static', filename='js/common.js') }}"></script>
    <script type="module" src="{{ url_for('static', filename='js/common_json.js') }}"></script>
    <script type="module" src="{{ url_for('static', filename='js/beautify_json_page.js') }}"></script>
</head>


<body>

<h2>输入 Json 数据 :</h2>

<div class="container">
    <!--    <textarea id="json_data" name="json_data" contenteditable="true">{{ json_data | safe }}</textarea>-->
    <pre id="json_data" name="json_data" contenteditable="true">{{ json_data | safe }}</pre>

    <div class="arrows">
        <span>&#x2192;</span>
        <span>&#x2192;</span>
        <span>&#x2192;</span>
    </div>
    <pre id="formatted_json" contenteditable="true">{{ json_data | safe }}</pre>
</div>

<div class="button-container">
    <button type="button" onclick="beautifyJson('json_data','formatted_json')">美化Json</button>
    <button type="button" onclick="copy_common('formatted_json')">复制Json</button>
    <a href="/" style="text-decoration: none;">
        <button type="button">返回</button>
    </a>
</div>

<div id="custom-alert" class="custom-alert"></div>
</body>
</html>